package com.gigi.controller;

import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.Response;
import com.gigi.entity.FollowShiqinEntity;
import com.gigi.model.FollowDO;
import com.gigi.model.ListFollowRequest;
import com.gigi.service.manual.FollowManageService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 关注管理
 */
@RestController
@RequestMapping("follow-manage")
public class FollowManageController {

    private final FollowManageService followManageService;

    public FollowManageController(FollowManageService followManageService) {
        this.followManageService = followManageService;
    }

    @ApiOperation(value = "列表")
    @PostMapping("/list")
    public MultiResponse<FollowDO> list(@RequestBody ListFollowRequest request) {
        return followManageService.list(request);
    }

    @ApiOperation(value = "新增/删除")
    @PostMapping("/change")
    public Response change(@RequestBody FollowDO request) {
        return followManageService.change(request);
    }

}
